//品牌管理服务（algular 前端分层）
app.service("brandService",function ($http) {
    //获取所有
    this.findAll=function () {
        return  $http.get("../brand/findAll.do");
    }
    //新增品牌服务
    this.add=function (entity) {
        return $http.post("../brand/add.do",entity);
    }

    //更新品牌服务
    this.update=function (entity) {
        return $http.post("../brand/update.do",entity);
    }

    //获取一个品牌
    this.findOne=function (id) {
        return  $http.get("../brand/findOne.do?id="+id);
    }

    //删除多个品牌
    this.delete=function (ids) {
        return   $http.post("../brand/delete.do?ids="+ids);
    }

    this.search=function (page,size,entity) {
        return  $http.post("../brand/search.do?page="+page+"&size="+size,entity);
    }


    this.findBrandList=function () {
        return  $http.get("../brand/selectOptionList.do");
    }
})